﻿@helper MakeInstallerLink(string productDirectory,Milan.Deploy.ReleaseType releaseType) {
    // Die Hilfsmethode kann Code und/oder Markup enthalten, z. B.
    // var msg = "Hallo " + name;
    // <p>@msg</p>
    // Weitere Informationen finden Sie unter ""http://go.microsoft.com/fwlink/?LinkID=204658"".
    var productname = System.IO.Path.GetFileName(productDirectory);
    var releaseName = releaseType.ToString()+".txt";
    var lastVersion = File.Exists(Path.Combine(productDirectory, releaseName)) ? File.ReadAllText(Path.Combine(productDirectory, releaseName)) : "";
    if (lastVersion != "")
    {
        var link = productname + "/" + Milan.Deploy.Client.FormatVersionDirectory(Version.Parse(lastVersion)) + "/install.exe";
       <a href="@link">@lastVersion</a>
    }
}
